<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="res/jquery.min.js"></script>

    <script src="src/bs.base.js"></script>
    <script src="src/bs.ui.js"></script>
    <script src="src/bs.utils.js"></script>
    <script src="src/bs.string.js"></script>
    <script src="res/plugins/hotkeys/0.7.9/jquery.hotkeys.js" type="text/javascript"></script>

    <link rel="stylesheet" href="res/style/common.css">
</head>
<body>
<input type="button" id="bindCtrlS" value="bind ctrl+s"/>
<input type="button" id="unBindCtrlS" value="unbind ctrl+s"/>
<span id="d1"></span>
  <script>
    bs.tip.loading('提示啦！');
     /* var str = "abc,aa,";
     // alert(str.endWith(',') + '==='+ str.getLen());
      var d1 = '2014-10-12';
      function lambda(l) {
          var fn = l.match(/\((.*)\)\s*=>\s*(.*)/);
          var p = [];
          var b = "";
          if (fn.length > 0) fn.shift();
          if (fn.length > 0) b = fn.pop();
          if (fn.length > 0) p = fn.pop().replace(/^\s*|\s(?=\s)|\s*$|,/g, '').split(' ');
          // prepend a return if not already there.
          fn = ( ( !/\s*return\s+/.test(b) ) ? "return " : "" ) + b;
          p.push(fn);
          try {
              return Function.apply({}, p);
          } catch (e) {
              return null;
          }
      }
    $(document).ready(function(){
        console.log(d1.toDate());//Date {Sun Oct 12 2014 00:00:00 GMT+0800}
        d1 = '2014/10/12'; //格式不正确取当前日期
        console.log(d1.toDate());
        d1 = '2014/10/12'; //格式不正确取当前日期
        console.log(d1.toDate('yyyy/MM/dd'));
        var x= 1,y=2;
        var s1 = '(x,y)=>x+y';
        alert(lambda(s1));

        //$('#d1').html(d1.toDate('yyyy-MM-dd'));
    });*/
    /*  function bindCtrlS() {
          jQuery(document).bind('keydown', 'ctrl+s', function (evt) {
              alert("Ctrl+S");
              return false;
          });
      }

      function unBindCtrlS() {
          jQuery(document).unbind('keydown', 'ctrl+s');
      }

      $(document).ready(function () {
                  $('#bindCtrlS').bind('click', bindCtrlS);
                  $('#unBindCtrlS').bind('click', unBindCtrlS);
              }
      );*/
//var str = '/aa/?a=1&b=2';
//var arr = String(str).split(/&|;/);
//console.log("arr大小:" + arr.length + "------>>" + (arr.length >> 0));
//
//str = '/aa/?a=1&b=2;c=3';
//arr = String(str).split(/&|;/);
//console.log("arr2222大小:" + arr.length + "------>>" + (arr.length >> 0));
//
//var i = 0,
//        l = arr.length >> 0;
//while (i < l) {
//    if (i in arr){
//        console.log("arr[i]==" + arr[i]);
//    }
//    ++i;
//};
//arr = [];
//console.log("arr.length======>>==" + (arr.length >> 0));
  </script>
</body>
</html>